"SelectCommand.Connection property has not been initialized."

that should tell you everything you need to know.
either set the connection property of your command to the sqlconnection object, or use CreateCommand() from the sqlconnection object.